package com.mytest.controller;

import com.mytest.annotation.LoginRequired;
import com.mytest.annotation.TestAnno;
import com.mytest.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Wulc
 * @date 2024/4/7 14:20
 * @description
 */
@RestController
@RequestMapping("/")
public class TestController {
    @Autowired
    private TestService testService;

    @GetMapping("/test1")
    @TestAnno(value = "wulc")
    public void test1() {
        testService.test123();
    }

    @GetMapping("/test2")
    @TestAnno(value = "wulc2")
    @LoginRequired
    public void test2() {
        testService.test123();
    }
}
